package com.futao.spring.lifecycle.conroller;

import com.futao.spring.lifecycle.cycle.scope.test.TestThreadBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ft <futao@mysteel.com>
 * @date 2021/1/29
 */
@Slf4j
@RestController
@RequestMapping("/common")
public class CommonController {

    @Autowired
    private TestThreadBean testThreadBean;

    @GetMapping("/scope")
    public TestThreadBean scope() {
        log.info("..........{}", testThreadBean);
        return testThreadBean;
    }
}
